﻿<div id="pager">
            #set($pagenumbers = 5)  ##显示多少页码
            #set($pagestart =  $pager.GetPageFirst($page,$pages,$pagenumbers)) 
            #set($pageend = $pager.GetPageLast($page,$pages,$pagenumbers))
                <div class="pager">
                    <a href="$pager.GetFileName($filename,1)" title="第一页" class="btn pageFitst">首页</a>
                    <a href="$pager.GetFileName($filename,$pager.GetPagePrev($page,$pages))" title="上一页" class="btn pagePrev">上一页</a>
                    #foreach($i in [$pagestart..$pageend])
                        #if ($i == $pagestart)
                           #if ($i == $page)
                                <a href="$pager.GetFileName($filename,$i)" class="nl current">$i</a>
                           #else
                                <a href="$pager.GetFileName($filename,$i)" class="nl">$i</a>
                           #end
                        #else
                            #if ($i == $page)
                                <a href="$pager.GetFileName($filename,$i)" class="current">$i</a>
                            #else
                                <a href="$pager.GetFileName($filename,$i)">$i</a> 
                            #end
                        #end
                    #end
                    <a href="$pager.GetFileName($filename,$pager.GetPageNext($page,$pages))" title="下一页" class="btn pageNext">下一页</a>
                    <a href="$pager.GetFileName($filename,$pages)" title="最后一页" class="btn pageLast">末页</a>
                    <select onchange="MM_jumpMenu(this,'$filename')">
                    #foreach($i in [1..$pages])
                        #if ($i == $page)
                    	<option value="$i" selected="selected">第$i页</option>
                    	#else
                        <option value="$i">第$i页</option>
                        #end
                    #end
                    </select>
                </div>
            </div>
            <script type="text/javascript">
                function MM_jumpMenu(selObj, filename) {
                    top.location = filename + "_" + selObj.options[selObj.selectedIndex].value + ".htm";
                }
            </script>
